package com.nanjia.boot.outboundorderview.model.form;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 出库单业务关联表单对象
 *
 * @author 周洋
 * @since 2025-08-25 00:11
 */
@Getter
@Setter
@Schema(description = "出库单业务关联表单对象")
public class OutboundOrderViewForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @NotNull(message = "不能为空")
    private Long id;

    @Schema(description = "出库单ID")
    @NotNull(message = "出库单ID不能为空")
    private Long outboundOrderId;

    private Long externalId;

    @NotNull(message = "不能为空")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @NotNull(message = "不能为空")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @Schema(description = "这个是用于业务关联用，目前先考虑：销售和退货")
    @NotBlank(message = "这个是用于业务关联用，目前先考虑：销售和退货不能为空")
    @Size(max=30, message="这个是用于业务关联用，目前先考虑：销售和退货长度不能超过30个字符")
    private String externalType;


}
